home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / resources / disk.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  3KB  |  140 lines

  1. #ifndef RESOURCES_DISK_H
  2. #define RESOURCES_DISK_H 1
  3. /*
  4. ** disk.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/03/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for disk.h
  17. */
  18. #ifndef DiscResourcePtr
  19. #define DiscResourcePtr ADDRESS
  20. #endif
  21. #ifndef DiscResourceUnitPtr
  22. #define DiscResourceUnitPtr ADDRESS
  23. #endif
  24. /*
  25. ** End of StructPointer defines for disk.h
  26. */
  27.  
  28.  
  29. #ifndef EXEC_TYPES_H
  30. #include <exec/types.h>
  31. #endif
  32.  
  33. #ifndef EXEC_LISTS_H
  34. #include <exec/lists.h>
  35. #endif
  36.  
  37. #ifndef EXEC_PORTS_H
  38. #include <exec/ports.h>
  39. #endif
  40.  
  41. #ifndef EXEC_INTERRUPTS_H
  42. #include <exec/interrupts.h>
  43. #endif
  44.  
  45. #ifndef EXEC_LIBRARIES_H
  46. #include <exec/libraries.h>
  47. #endif
  48.  
  49.  
  50. /********************************************************************
  51. *
  52. * Resource structures
  53. *
  54. ********************************************************************/
  55.  
  56.  
  57. STRUCT DiscResourceUnit  
  58.     _Message dru_Message 
  59.     Interrupt dru_DiscBlock 
  60.     Interrupt dru_DiscSync 
  61.     Interrupt dru_Index 
  62. END STRUCT 
  63.  
  64. STRUCT DiscResource  
  65.     _Library dr_Library 
  66.     DiscResourceUnitPtr  dr_Current 
  67.     BYTE            dr_Flags 
  68.     BYTE            dr_pad 
  69.     LibraryPtr  dr_SysLib 
  70.     LibraryPtr  dr_CiaResource 
  71.     STRING dr_UnitID SIZE 16  /* 4*SIZEOF(LONGINT) */
  72.     _List dr_Waiting 
  73.     Interrupt dr_DiscBlock 
  74.     Interrupt dr_DiscSync 
  75.     Interrupt dr_Index 
  76.     TaskPtr  dr_CurrTask 
  77. END STRUCT 
  78.  
  79. /* dr_Flags entries */
  80. #define DRB_ALLOC0  0   /* unit zero is allocated */
  81. #define DRB_ALLOC1  1   /* unit one is allocated */
  82. #define DRB_ALLOC2  2   /* unit two is allocated */
  83. #define DRB_ALLOC3  3   /* unit three is allocated */
  84. #define DRB_ACTIVE  7   /* is the disc currently busy? */
  85.  
  86. #define DRF_ALLOC0  (1)  /* unit zero is allocated */
  87. #define DRF_ALLOC1  (2)  /* unit one is allocated */
  88. #define DRF_ALLOC2  (4)  /* unit two is allocated */
  89. #define DRF_ALLOC3  (8)  /* unit three is allocated */
  90. #define DRF_ACTIVE  (128)  /* is the disc currently busy? */
  91.  
  92.  
  93.  
  94. /********************************************************************
  95. *
  96. * Hardware Magic
  97. *
  98. ********************************************************************/
  99.  
  100.  
  101. #define DSKDMAOFF   &H4000  /* idle command for dsklen register */
  102.  
  103.  
  104. /********************************************************************
  105. *
  106. * Resource specific commands
  107. *
  108. ********************************************************************/
  109.  
  110. /*
  111.  * DISKNAME is a generic macro to get the name of the resource.
  112.  * This way if the name is ever changed you will pick up the
  113.  *  change automatically.
  114.  */
  115.  
  116. #define DISKNAME    "disk.resource"
  117.  
  118.  
  119. #define DR_ALLOCUNIT    (LIB_BASE - 0*LIB_VECTSIZE)
  120. #define DR_FREEUNIT (LIB_BASE - 1*LIB_VECTSIZE)
  121. #define DR_GETUNIT  (LIB_BASE - 2*LIB_VECTSIZE)
  122. #define DR_GIVEUNIT (LIB_BASE - 3*LIB_VECTSIZE)
  123. #define DR_GETUNITID    (LIB_BASE - 4*LIB_VECTSIZE)
  124. #define DR_READUNITID   (LIB_BASE - 5*LIB_VECTSIZE)
  125.  
  126. #define DR_LASTCOMM (DR_READUNITID)
  127.  
  128. /********************************************************************
  129. *
  130. * drive types
  131. *
  132. ********************************************************************/
  133.  
  134. #define DRT_AMIGA   (&H00000000)
  135. #define DRT_37422D2S    (&H55555555)
  136. #define DRT_EMPTY   (&HFFFFFFFF)
  137. #define DRT_150RPM  (&HAAAAAAAA)
  138.  
  139. #endif /* RESOURCES_DISK_H */
  140.